<template>
  <div>
    <div>
    <!-- table区域-begin -->
    <a-table
      ref="table"
      size="middle"
      rowKey="id"
      bordered
      :columns="columns"
      :dataSource="dataSource"
      :pagination="ipagination"
      :loading="loading"
      :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
      @change="handleTableChange"
    >
      <template slot="serialNum" slot-scope="text,record,index">
        {{(ipagination.current-1) * ipagination.pageSize + parseInt(index) + 1}}
      </template>
    </a-table>
    </div>

  </div>
</template>

<script>

  import {YcListMixin} from '@/mixins/YcListMixin'
  import YchConstant from "@/api/YchConstant";

  export default {
    name: 'TableList',
    mixins: [YcListMixin],
    components: {
    },
    props: {
      groupId: {
        type: String,
        required: true
      },
    },
    data() {
      return {
        queryParam: {
          groupId: this.groupId
        },
        columns: [
          {
            title:this.$t('m.common.label.number'),
            dataIndex: '',
            key: 'rowIndex',
            width: 50,
            align: 'center',
            scopedSlots: { customRender: 'serialNum' },
          },
          {
            title: this.$t('m.eform.apptable.entity.tableName'),
            align: 'center',
            dataIndex: 'tableName'
          },
          {
            title: this.$t('m.eform.apptable.entity.tableDesc'),
            align: 'center',
            dataIndex: 'tableDesc'
          },
          {
            title: this.$t('m.eform.apptable.entity.dsName'),
            align: 'center',
            dataIndex: 'dsName'
          },
        ],
        url: {
          list: YchConstant.PREFIX_EFORM + '/manage/actAppTable/list',
        },
        createObjVisible: false,
        createERModelVisible: false,
        currentId: null,
      }
    },
    methods: {
    }
  }
</script>
<style lang="less" scoped>

</style>
